public class Geometry
{
   /**
      Computes the area of a triangle
      @param x1 the x-coordinate of the first corner
      @param y1 the y-coordinate of the first corner
      @param x2 the x-coordinate of the second corner
      @param y2 the y-coordinate of the second corner
      @param x3 the x-coordinate of the third corner
      @param y3 the y-coordinate of the third corner
      @return the area of the triangle
   */
   public static double triangleArea(double x1, double y1,
      double x2, double y2, double x3, double y3)
   {
      return Math.abs(((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2);
   }
}